
var workOrder = echarts.init(document.getElementById('workOrder'));
function wfChart(data) {
    return  {
        //backgroundColor:'#081C90',
        grid:{
            top: '80px',
            left:0,
            right:0,
            bottom:0
        },
        tooltip:{formatter: "{b}: {c}",},
        legend: {
            orient: 'horizontal',
            textStyle:{
                color:'#fff'
            },
            bottom:'8%',
            //icon: 'circle',
            data: ['告警', '随手拍', '整改'],
        },
        series: [{
            type: 'pie',
            name:"工单",
            center: ['50%', '40%'],
            radius: ['50%', '68%'],
            roseType: 'radius',
            startAngle: 100,
            color: ['#FF4F64','#FF9D1B', '#FF6426'],
            label: {
                normal: {
                    formatter: "{b}: {c}",
                    show: false
                }
            },
            labelLine: {
                normal: {
                    show: false
                },

            },
            data: [{
                value: data[0].finish,
                name: '告警',

            }, {
                value: data[2].finish,
                name: '随手拍',
            }, {
                value: data[3].finish,
                name: '整改',

            }]
        }, {
            type: 'pie',
            center: ['50%', '40%'],
            radius: ['42%', '44%'],
            hoverAnimation: false,
            triggerTooltip:false,
            legendHoverLink:false,
            label: {
                show: false,
            },
            tooltip: {
                show:false
            },
            data: [{
                value: 0,
                itemStyle: {
                    normal: {
                        color: '#5f616e'
                    }
                }
            }]
        }, {
            name: '',
            type: 'pie',
            clockWise: true,
            tooltip: {
                show:false
            },
            center: ['50%', '40%'],
            radius: [0, '0%'],
            label: {
                normal: {
                    position: 'center'
                }
            },
            data: [{
                value: 0,
                itemStyle: {
                    normal: {
                        color: '#43AFF1'
                    }
                },
                label: {
                    normal: {
                        formatter: '总运维'+(data[0].finish+data[2].finish+data[3].finish),
                        textStyle: {
                            color: '#fff',
                            fontSize: 25,
                            //fontWeight: 'bold'
                        }
                    }
                }
            }]
        }]
    };
}
// 使用刚指定的配置项和数据显示图表。

